package pl.edu.pw.stud.ltrzaska.mvc.model.state;

import org.apache.log4j.Logger;

public class StateBeforeVerify implements IState {
	private static Logger LOGGER = Logger.getLogger(StateBeforeVerify.class);
	
	private boolean policyFileRead = false;
	private boolean filesystemRead = false;
	private boolean outputFileSet = true;

	public boolean isPolicyFileRead() {
		return policyFileRead;
	}

	public void setPolicyFileRead(boolean policyFileRead) {
		this.policyFileRead = policyFileRead;
	}

	public boolean isFilesystemRead() {
		return filesystemRead;
	}

	public void setFilesystemRead(boolean filesystemStateRead) {
		this.filesystemRead = filesystemStateRead;
	}

	@Override
	public boolean canContinue() {
		LOGGER.debug("isOutputFileSet: " + isOutputFileSet());
		LOGGER.debug("isFilesystemRead: " + isFilesystemRead());
		LOGGER.debug("isPolicyFileRead: " + isPolicyFileRead());
		return isOutputFileSet() && isFilesystemRead() && isPolicyFileRead();
	}

	@Override
	public String introduce() {
		return "Oczekuje na wybranie plikow wejsciowych i wyjsciowych oraz dokonanie wszystkich ustawien.";
	}

	public void setOutputFileSet(boolean outputFileSet) {
		this.outputFileSet = outputFileSet;
	}

	public boolean isOutputFileSet() {
		return outputFileSet;
	}

}
